﻿using Model;

namespace IDAL
{
    public interface IYkDal<T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t">表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Add(T t);
        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="t">表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> PlAdd(List<T> t);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="t">表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Delete(T t);
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="t">表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> PlDelete(List<T> t);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t">表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Update(T t);
        /// <summary>
        /// 批量修改
        /// </summary>
        /// <param name="t">表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> PlUpdate(List<T> t);
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        IQueryable<T> Show();
    }
}
